import requests
r = requests.get('https://www.baidu.com/?tn=44004473_2_oem_dg')
print(r.status_code)   # 打印状态码
print(r.url)    # 打印请求url
print(r.headers)    #  打印headers头信息
print(r.cookies)    #  打印cookies信息
print(r.text)    #  以文本形式打印网页源码
print(r.content.decode('utf-8'))     # 以字节流形式打印

'''
带参数的GET请求：
    1，直接将参数放url内
'''
a = requests.get('https://www.baidu.com/?tn=44004473_2_oem_dg/get?name=gemey&age=22')
print(a.text)